import { NavBar} from "antd-mobile";
import React from "react";
import { useHistory } from "react-router-dom";

export default function Header(props :any) {

    const history = useHistory()
  const back = () => {
    history.goBack()
  }
    
  return (
    <div className="xz-header">
      <NavBar onBack={back}>{props.title}</NavBar>
    </div>
  );
}
